const fs = require('fs')
let imgsname = fs.readFileSync('./imgSrc.txt', 'utf-8')
imgsname = imgsname.split('---')
console.log(imgsname);
var arr = []
imgsname.forEach((item,index)=>{
    var obj = {
        shopsimg:item
    }
    arr.push(obj)
})
const mongoose = require('../db/mongoose')
const shopsSchema = new mongoose.Schema({
    shopsimg:String
})
const shopsModel = mongoose.model('imgSrc',shopsSchema)
shopsModel.insertMany(arr).then(res=>{
    console.log(res);
})